//
//  PGDeviceItemCell.m
//  PhotographicGuide
//
//  Created by indream on 13-2-10.
//  Copyright (c) 2013年 indream. All rights reserved.
//

#import "PGDeviceItemCell.h"

@implementation PGDeviceItemCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}
-(void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
    [super setHighlighted:_isHiddenShop?NO:highlighted animated:animated];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:_isHiddenShop?NO:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setIsHiddenShop:(BOOL)isHiddenShop{
    _isHiddenShop = isHiddenShop;
    _priceLabel.hidden = isHiddenShop;
    _accessoryShopView.hidden = isHiddenShop;
    CGRect rect = _titleLabel.frame;
    rect.size.width = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone?(isHiddenShop?220:172):(isHiddenShop?552:532);
    [_titleLabel setFrame:rect];
}
@end
